const initgoods = {
    name: 'panda',
    price: 998,
    date: new Date().getFullYear()
}


  let goodsReducer = (preState = initgoods, action) => {
    const { type, data } = action;
    switch (type) {
        case 0:
            return data;
            break;
        case 1:
            return data;
            break;
        default: return preState
    }
}


export default goodsReducer